<?php
$dbh=new PDO('mysql:host=localhost;dbname=gaofei','root','root');
$page=$_GET['page']??1;
$limit=2;
$start=($page-1)*$limit;
$sql="select * from articless limit $start,$limit";
$arr=$dbh->query($sql)->fetchAll(PDO::FETCH_ASSOC);
?>
<a href="listall.php?page=<?php echo $page?>">批量静态</a>
<table border="1">
    <tr>
        <td>文章id</td>
        <td>文章名字</td>
        <td>文章作者</td>
        <td>操作</td>
    </tr>
    <?php foreach($arr as $key=>$value) { ?>
        <tr>
            <td><?php echo $value['id']?></td>
            <td><?php echo $value['article_name']?></td>
            <td><?php echo $value['article_author']?></td>
            <td>
                <a href="wjt.php?id=<?php echo $value['id']?>">伪静态</a>
            </td>

        </tr>

    <?php } ?>
</table>
<a href="list.php?page=1">首页</a>
<a href="list.php?page=<?php echo $page-1;?>">上一页</a>
<a href="list.php?page=<?php echo $page+1;?>">下一页</a>

